I run a Macintosh with a MacHTTP web server and an Apple Internet Mail Server in my office, and there are times I’d just like to peek at the Mac’s screen. However, I don’t like waiting for that machine’s monitor to warm up. Even worse, I recently had to borrow that machine’s monitor for another machine. My solution?
I wrote this CGI application in CodeWarrior C that takes a screenshot of the current Macintosh screen, converts it to a .GIF file, and displays it all in your web browser.
I used Grant Neufeld’s excellent framework (Grant's CGI Framework 1.0b10).
Installation
To install the program, just copy it to the same folder you use for your other CGI scripts and applications (or make a new one...it doesn’t matter where you put it). You should give the program a unique name unless you want everybody on the WWW to be peeking at your server’s screen!
Use
In your web browser, type the following URL:
http://<your server name here>/<the program's folder>/<the program's name>
For example, if your server is www.goofball.com, your CGI folder is called MyCGIs and you named my program capture_it.acgi, you would use the following URL:
http://www.goofball.com/MyCGIs/capture_it.acgi
Some notes about the current implementation (version 0.1)
• This is a “Fat” binary, capable of running native on both 68K and PowerPC Macs
• I don’t own WebStar, so I haven’t tested that (but it should work)
• The current version is hard-coded to generate a 256-color, 640*480 .GIF file. If your display’s something other than that, it’ll try to dither the image for the best possible quality.
• It takes anywhere from 2 to 10 seconds to generate the .GIF file, so be patient.
• If an error occurs, the program reports the error in the resulting HTML document.